/**
 * Sysnet Pionner Solutions
 * @license : Under MIT, GNU
 * @document : sysnet_pioneer-page.js
 * @created : Nov 29, 2011, 9:37:47 AM
 * @author : 006550
 * @template : created by Darkarts
 */

var _page = {}
    
    _page.storage = {}
        
    _page.current = "#index";
    
    _page.store = function(page,url){
        if(!url)url = this.get_hash();
        
        if(!this.is_stored() && _page.storage){
            this.storage[url] = page;
        }
    }
    
    _page.is_stored = function(hash){
        var stored = false;
        
        if(!hash){hash=this.get_hash()}
        $.each(this.storage,function(hash_key,page){
            if(hash_key == hash)stored=true;
        });
        
        return stored;
    }
    
    _page.sumbitted_data = function(data){
        
        
        
    }
    
    _page.get_hash = function(){return location.hash.substr(1);}
    
    _page.get_current = function(){
        var hash_key = this.get_hash();
        return (_page.storage[hash_key]) ? _page.storage[hash_key] : "";
    }
    
    _page.destroy_current = function(hash_key){
        var hash_key = (hash_key) ? hash_key : this.get_hash();
        delete _page.storage[hash_key];
    }
    
